package com.study.constructor;

public class Student {
    String name;
    int score;
    //构造器：名称必须与类名一样，不能写返回值
    //特点：每次创建对象时，对象会立即调用构造器
    public Student(){
        System.out.println("调用无参");
    }
    public Student(int i){
        System.out.println("调用有1个参");
    }
    public Student(String name,int score){
        this.name=name;
        this.score=score;
    }
}
